package com.hero.take.constant;

/**
 * 接口返回信息枚举类
 */
public enum MsgEnum {

    /**
     * 常用
     */
    Common_Record_Not_Exist("Record_Not_Exist", "记录不存在"),
    Common_Data_Not_Blank("Common_Data_Not_Blank", "数据不能为空"),

    /**
     * 系统相关
     */
    SYS_DealData_NotExists("999009", "处理的数据不存在！"),
    Sys_Role_Name_Exist("Sys_Role_Name_Exist", "角色名称已存在"),
    Sys_Role_Code_Exist("Sys_Role_Code_Exist", "角色编码已存在"),
    Sys_UserName_Exist("Sys_UserName_Exist", "用户名已经存在"),
    Sys_Password_IsBlank("Sys_Password_IsBlank", "密码不能为空"),
    Sys_Org_Code_Exist("Sys_Org_Code_Exist", "机构编码已存在"),
    Sys_Dict_Code_Exist("Sys_Dict_Code_Exist", "字典编码已存在"),
    Sys_UserName_Not_Exist("Sys_UserName_Not_Exist", "用户名不存在"),
    Sys_Password_Error("Sys_Password_Error", "密码错误"),
    Sys_Oldpassword_Error("Sys_Oldpassword_Error", "原密码不正确"),
    Sys_Zzd_Account_Not_Bind("Sys_Zzd_Account_Not_Bind", "浙政钉账号未绑定"),

    /**
     * 预警业务相关
     */
    Alarm_Device_Point_Not_Exist("Alarm_Device_Point_Not_Exist", "相机设备不存在"),
    Alarm_Black_List_Not_Exist("Alarm_Black_List_Not_Exist", "黑名单未查询到"),
    Alarm_WorkOrder_HasAppointed("Alarm_WorkOrder_HasAppointed", "工单已指派"),
    Car_NotIn_JX("Car_NotIn_JX", "该主体已不在区域范围内，请转外协或取消预警"),

    /**
     * 工单
     */
    No_User_Group_Is_Bound("No_User_Group_Is_Bound", "当前用户未绑定用户组"),

    /**
     * 基础治理四平台业务相关
     */
    Governance_Task_HasAppoint("Governance_Task_HasAppoint","任务已指派");
    ;
    private String msg;
    private String code;

    MsgEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public final static String getMsg(String code) {
        for (MsgEnum value : values()) {
            if (value.getCode() == code) return value.msg;
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}